package com.woniu.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.annotation.Nullable;
import javax.validation.constraints.*;


/**
 * @author jiang
 */
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "分页查询订单表单")
public class GetPageOrderForm {
    @ApiModelProperty("页码")
    @Builder.Default
    @Min(value = 1, message = "页码最小为1")
    @Max(value = 999, message = "页码最大为999")
    private Integer pageNum = 1;
    @ApiModelProperty("每页条数")
    @Builder.Default
    @Min(value = 1, message = "页码最小为1")
    @Max(value = 999, message = "页码最大为999")
    private Integer pageSize = 3;
    @ApiModelProperty("订单编号")
    @Length(max = 30, message = "订单编号长度最大为30个字符")
    private String orderNum;
    @ApiModelProperty("用户电话")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
    private String userPhone;
    @ApiModelProperty("店铺名称")
    @Length(max = 20, message = "用户名长度最大为20个字符")
    private String storeName;
    @ApiModelProperty("用户名")
    @Length(max = 20, message = "用户名长度最大为20个字符")
    private String userName;
    @ApiModelProperty("用户地址")
    private String userAddress;
    @ApiModelProperty("订单状态")
    @Pattern(regexp = "[0-9]", message = "订单号必须是0-9之间的单个数字")
    private String orderStatus;


    private String orderStartTime;


    private String orderEndTime;
}
